<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <title>TODO supply a title</title>
    </head>
    <body>
       <h:form>  
  
      
         
  
            <p:panel header="Personal Details">  
              
                <h:messages errorClass="error"/>  
                  
                <h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">  
                    <h:outputText value="Nome da Empresa *" />  
                    <p:inputText id="nome" required="true" label="NomeEmpresa"  
                            value="#{CadastroEmpresa.user.nome}" />  
                      
                    <h:outputText value="Endereço: *" />  
                    <p:inputText id="endereco" required="true" label="Endereco"  
                            value="#{CadastroEmpresa.endereco}" />  
                      
                    <h:outputText value="CNPJ: " />  
                    <p:inputText required="true" label="CNPJ"
                                 value="#{CadastroEmpresa.cnpj}" />  
                   
                    <h:outputText value="Logotipo: " />  
                    <p:inputText 
                                 value="#{CadastroEmpresa.logo}" />  
                    
                    <p:commandButton value="Submit" update="display"
                                     actionListener="#{CadastroEmpresa.cadastrar()}" 
                                     oncomplete="dialog.show()"/>  
  
                </h:panelGrid>  
                <p:dialog widgetVar="dialog" width="250" height="225" modal="true">  
        <h:panelGrid id="display" columns="2" cellpadding="5">  
      
            <h:outputText value="Nome " />  
            <h:outputText value="#{CadastroEmpresa.nome}" />  
              
            <h:outputText value="Endereço " />  
            <h:outputText value="#{CadastroEmpresa.endereco}" />  
              
            <h:outputText value="CNPJ: " />  
            <h:outputText value="#{CadastroEmpresa.cnpj}"/>  
              
        </h:panelGrid>  
    </p:dialog>  
            </p:panel>  
        
              
          
      
    <p:ajaxStatus>  
        <f:facet name="start">  
            <h:graphicImage value="../design/ajaxloading.gif" />  
        </f:facet>  
          
        <f:facet name="complete">  
            <h:outputText value="" />  
        </f:facet>  
    </p:ajaxStatus>  
                              
</h:form>   
    </body>
</html>
